import React, { Component } from 'react';
import Head from 'views/component/head/head';
import { hashHistory } from 'react-router';
import Footer from 'views/footer/footer';
import { SubViewLink } from 'views/component/subViewLink/subViewLink';
import { i18n } from 'js/core/i18n';
import './set.scss';
import userData from 'js/core/userData';

const SetItem = ({ linkTo, children, imgCls }) => (
	<div className="flex-vcenter">
		<div className={`setItem-img ${imgCls}`} />
		{children}
	</div>
);
class Set extends Component {
	render() {
		return <div id="set-box" className="flex-col">
			<Head head={i18n.get("设置")} className="mb20" />
			<div className="set-content">
				{userData.hasPower(1) && <SubViewLink moduleName="device" className="flex-vcenter" title={i18n.get("设备管理")}>
					<div className={`setItem-img img1`} />
					{i18n.get("设备配置")}
				</SubViewLink>}
				{userData.hasPower(701) && <SubViewLink moduleName="active" className="flex-vcenter" title={i18n.get("活动管理")}>
					<div className={`setItem-img img2`} />
					{i18n.get("活动配置")}
				</SubViewLink>}
				{userData.hasPower(701) && <SubViewLink moduleName="shopTour" className="flex-vcenter" title={i18n.get("巡店配置")}>
					<div className={`setItem-img img3`} />
					{i18n.get("巡店配置")}
				</SubViewLink>}
			</div>
		</div>;
	}
}

export default Set;
